#ifndef CANGATEWAY_H
#define CANGATEWAY_H

#include <QObject>
#include <QTimer>
#include "socketbase.h"
#include "can.h"

class CanGateway : public SocketBase
{
        Q_OBJECT
public:
        typedef unsigned long int id_t;
private:
        QMap<id_t, can_t> recivedMsges;

public:

    CanGateway();
    CanGateway(QObject *parent = 0);
    ~CanGateway();

    void send(id_t id, char * data, int num);
    void send(can_t s);

    const can_t & getMsg(id_t id) const ;
    bool hasMsg(id_t id) const;

public slots:

private slots:
    void readData();
};

#endif // CANGATEWAY_H
